
package com.sasis.service.impl;

import java.util.List;

import com.sasis.service.impl.BaseManager;
import com.sasis.model.ServiceSheet;
import com.sasis.dao.ServiceSheetDao;
import com.sasis.service.ServiceSheetManager;
import com.sasis.util.PageList;
import com.sasis.util.PageRequest;

public class ServiceSheetManagerImpl extends BaseManager implements ServiceSheetManager {
    private ServiceSheetDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setServiceSheetDao(ServiceSheetDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.sasis.service.ServiceSheetManager#getServiceSheets(com.sasis.model.ServiceSheet)
     */
    public List getServiceSheets(final ServiceSheet serviceSheet) {
        return dao.getServiceSheets(serviceSheet);
    }

    /**
     * @see com.sasis.service.ServiceSheetManager#getServiceSheet(String id)
     */
    public ServiceSheet getServiceSheet(final String id) {
        return dao.getServiceSheet(new Integer(id));
    }

    /**
     * @see com.sasis.service.ServiceSheetManager#saveServiceSheet(ServiceSheet serviceSheet)
     */
    public void saveServiceSheet(ServiceSheet serviceSheet) {
        dao.saveServiceSheet(serviceSheet);
    }

    /**
     * @see com.sasis.service.ServiceSheetManager#removeServiceSheet(String id)
     */
    public void removeServiceSheet(final String id) {
        dao.removeServiceSheet(new Integer(id));
    }
    
    public PageList queryForPageList(String listStatementId,
			Object parameterObject, PageRequest pageRequest) {
		return dao.queryForPageList(listStatementId, parameterObject,
				pageRequest);
	}
}
